<!doctype html>
<html>
<head>
    <title>{:L('message_title')}</title>
    <meta http-equiv="Content-Type" content="text/html; charset={:C('DEFAULT_CHARSET')}">
    {load href="/public/admin/css/bootstrap.min.css"/}
    {load href="/public/admin/css/elpis.min.css"/}
    {load href="__STATIC__/jquery-1.10.2.min.js"/}
    <style type="text/css">
        .showMsg {
            left: 50%;
            font-size: 14px;
            margin: -87px 0 0 -225px;
            position: absolute;
            top: 50%;
            width: 450px;
        }

        #wait {
            color: blue;
            font-weight: bold
        }
    </style>
</head>
<body>
<div class="alert {present name="message"}alert-success{else/}alert-danger{/present} showMsg">
    <h4 class="alert-heading">
        {present name="message"}
            {$message}
        {else/}
            {$error}
        {/present}
    </h4>
    <hr>
    <p>
    {:L('msg_system_1')} <span id="wait">{$waitSecond}</span> {:L('msg_system_2')} <a id="href" href="{$jumpUrl}">{:L('click_this')}</a>
        {:L('jump')}
    </p>
</div>

<script>
    var href = $("#href").attr('href');
    var time = $('#wait').html();
    var interval = setInterval(function () {
        time--;
        $('.wait').html(time);
        if (time <= 0) {
            if (href) {
                location.href = href;
                clearInterval(interval);
            } else {
                window.history.go(-1);
            }
        }
    }, 1000);

</script>
</body>
</html>